<?php

use Illuminate\Support\Facades\Route;

Route::get('/', function () {
    return view('welcome');
});



Route::any('test', 'App\Http\Controllers\TestController@test');
//上传图片
Route::any('uploadImage', 'App\Http\Controllers\UploadController@uploadImage');
Route::any('getImageUrl', 'App\Http\Controllers\UploadController@getImageUrl');

Route::any('auth/register', 'App\Http\Controllers\User\RegisterController@register');
Route::any('auth/login', 'App\Http\Controllers\AuthController@login');

//滑块验证
Route::any('captcha/verify', 'App\Http\Controllers\Captcha\CaptchaController@captchaVerify');

//发送短信验证码
Route::any('sms/validate/send', 'App\Http\Controllers\CommonController@sendSmsValidate');



Route::middleware(['middleware' => 'auth.jwt'])->group(function () {

    //登录
    Route::any('auth/me', 'App\Http\Controllers\AuthController@me');
    Route::any('auth/logout', 'App\Http\Controllers\AuthController@logout');
    Route::any('auth/refresh', 'App\Http\Controllers\AuthController@refresh');

    //会员
    Route::any('member/list', 'App\Http\Controllers\Member\MemberController@memberList');
    Route::any('member/detail', 'App\Http\Controllers\Member\MemberController@memberDetail');
    Route::any('member/save', 'App\Http\Controllers\Member\MemberController@save');

    //会员互动
    Route::any('member/favorite/update', 'App\Http\Controllers\Member\MemberController@updateMyFavorite');
    Route::any('member/thumbs_up/update', 'App\Http\Controllers\Member\MemberController@updateMyThumbsUp');
    Route::any('member/thumbs_up/list', 'App\Http\Controllers\Member\MemberController@receiveMyThumbsUpList');

    //会员聊天
    Route::any('message/chat/list', 'App\Http\Controllers\Message\MessageController@chatRoomList');
    Route::any('message/chat/message', 'App\Http\Controllers\Message\MessageController@chatRoomMessageList');
    Route::any('message/chat/send', 'App\Http\Controllers\Message\MessageController@sendMessage');
    Route::any('message/chat/unread_count', 'App\Http\Controllers\Message\MessageController@unreadChatCount');
    Route::any('message/chat/read_all', 'App\Http\Controllers\Message\MessageController@readAllChat');

});



Route::middleware([\App\Http\Middleware\AuthenticationMiddleware::class])->group(function () {


//    Route::any('member/list', 'App\Http\Controllers\Member\MemberController@memberList');
//    Route::any('member/detail', 'App\Http\Controllers\Member\MemberController@memberDetail');

//    Route::post('index', 'App\Http\Controllers\User\UserController@index');
//    Route::put('location/edit', 'App\Http\Controllers\LocationType\LocationTypeController@edit');
//    Route::get('location/lists', 'App\Http\Controllers\LocationType\LocationTypeController@lists');
//    Route::get('location/detail', 'App\Http\Controllers\LocationType\LocationTypeController@detail');
//    Route::delete('location/remove', 'App\Http\Controllers\LocationType\LocationTypeController@remove');

});

// 通过 协同微服务 IHG Gateway 验证
//Route::middleware([\App\Http\Middleware\IhgGatewayMiddleware::class])->group(function () {
//
//
//});















